package com.itheima.fuxichengxu;

public class Statistic {
    public static void main(String[] args) {
        int count = 0;
// 用for循环 提取出所有三位数
        for (int i = 100; i <= 999 ; i++) {
            //定义 个位 十位 百位的变量
            int ge = i % 10;
            int shi = i /10 % 10;
            int bai = i /100 %10;
            //用if语句设定水仙花数
            if(i == (ge*ge*ge) + (shi*shi*shi) + (bai*bai*bai)){
                //输出水仙花数
                System.out.print(i + " ");
                count++;
                if(count % 2 == 0){
                    System.out.println(" ");

                }
            }

        }
    }
}


